import { stringify } from 'qs';
import request from '@/utils/request';
import webpath from '@/utils/webpath';

export async function Login(params = {}) {

    return request(`/hrath/web/api/service/auth/login`, {
        method: 'POST',
        data: {
            ...params,
            method: 'insert',
        },
    });
}


export async function Logout(params = {}) {
    return request(`/${webpath}/web/api/service/auth/logout`, {
        method: 'POST',
        data: {
            ...params,
            method: 'update',
        },
    });
}


export async function getLoginCaptcha() {
  return request(`/${webpath}/web/api/service/auth/getLoginCaptcha`);
}